
public class DonationBox {
	private int totalDonationsInPennies;
	private String charityName;
	
	public DonationBox(String inCharityName) {
		totalDonationsInPennies = 0;
		charityName = inCharityName;
	}
	
	public void donate(int morePennies) {
		if(morePennies < 0) {
			return;
		}
		
		if(morePennies > 10000) {
			return;
		}
		
		totalDonationsInPennies += morePennies;
	}
	
	public int getTotalDonationsInPennies() {
		return totalDonationsInPennies;
	}
	
	public String getCharityName() {
		return charityName;
	}
	
	public String toString() {
		String val = "";
		
		val += "totalDonationsInPennies " + totalDonationsInPennies;
		val += " charityName " + charityName;
		
		return val;
	}
}
